/*
 * @desc:
 * @LastEditTime: 2022-10-27 09:07:44
 * @params:
 * @return::
 */
import { PersistedStateOptions } from 'pinia-plugin-persistedstate'

/**
 * @description pinia持久化参数配置
 * @param {String} key 存储到持久化的 name
 * @return persist
 * */
const piniaPersistConfig = (key: string) => {
  const persist: PersistedStateOptions = {
    key,
    storage: localStorage,
    // storage: sessionStorage
  }
  return persist
}

export default piniaPersistConfig
